﻿//===================================================================================
// Copyright (c) Ryan Garrett.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===================================================================================

namespace Caffeine.Core.Test.TestModel
{
    public class ModelForCommandAutoRegisterTestingB : ModelForCommandAutoRegisterTestingA
    {
        #region FirstName Property

        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        [Caffeine.Core.ModelBackingProperty(typeof(string), "FirstNameProperty", Caffeine.Core.ModelBase.StandardBehaviors, false, true)]
        protected readonly Caffeine.Core.ModelProperty<string> _FirstNameProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the FirstName backing property
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public Caffeine.Core.ModelProperty<string> FirstNameProperty
        {
            get { return _FirstNameProperty; }
        }

        /// <summary>
        /// Gets or sets the FirstNameProperty.Value value. This property supports change notification. If the FirstNameProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstNameProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public string FirstName
        {
            get { return FirstNameProperty.Value; }
            set { FirstNameProperty.Value = value; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.CommittedValue value. This property supports change notification. If the FirstNameProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public string FirstNameCommittedValue
        {
            get { return FirstNameProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsDirty flag. This property supports change notification. If the FirstNameProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool FirstNameIsDirty
        {
            get { return FirstNameProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsInvalid flag. This property supports change notification. If the FirstNameProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool FirstNameIsInvalid
        {
            get { return FirstNameProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.IsDefault flag. This property supports change notification. If the FirstNameProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool FirstNameIsDefault
        {
            get { return FirstNameProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the FirstNameProperty.ValidationErrors enumeration. This property supports change notification. If the FirstNameProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [FirstName + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public System.Collections.Generic.IEnumerable<Caffeine.Core.ValidationError> FirstNameValidationErrors
        {
            get { return FirstNameProperty.ValidationErrors; }
        }

        #endregion

        #region LastName Property

        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        [Caffeine.Core.ModelBackingProperty(typeof(string), "LastNameProperty", Caffeine.Core.ModelBase.StandardBehaviors, false, true)]
        protected readonly Caffeine.Core.ModelProperty<string> _LastNameProperty = null; //Will be set by reflection.

        /// <summary>
        /// Gets the LastName backing property
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public Caffeine.Core.ModelProperty<string> LastNameProperty
        {
            get { return _LastNameProperty; }
        }

        /// <summary>
        /// Gets or sets the LastNameProperty.Value value. This property supports change notification. If the LastNameProperty.Value value changes,
        /// it will cause a change notification event for this property. This property must follow the [LastNameProperty - "Property"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public string LastName
        {
            get { return LastNameProperty.Value; }
            set { LastNameProperty.Value = value; }
        }

        /// <summary>
        /// Gets the LastNameProperty.CommittedValue value. This property supports change notification. If the LastNameProperty.CommittedValue value changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "CommittedValue"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public string LastNameCommittedValue
        {
            get { return LastNameProperty.CommittedValue; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsDirty flag. This property supports change notification. If the LastNameProperty.IsDirty flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsDirty"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool LastNameIsDirty
        {
            get { return LastNameProperty.IsDirty; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsInvalid flag. This property supports change notification. If the LastNameProperty.IsInvalid flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsInvalid"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool LastNameIsInvalid
        {
            get { return LastNameProperty.IsInvalid; }
        }

        /// <summary>
        /// Gets the LastNameProperty.IsDefault flag. This property supports change notification. If the LastNameProperty.IsDefault flag changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "IsDefault"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public bool LastNameIsDefault
        {
            get { return LastNameProperty.IsDefault; }
        }

        /// <summary>
        /// Gets the LastNameProperty.ValidationErrors enumeration. This property supports change notification. If the LastNameProperty.ValidationErrors enumeration changes,
        /// it will cause a change notification event for this property. This property must follow the [LastName + "ValidationErrors"] convention for change events to work correctly.
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelProperty Snippet", "1.0")]
        public System.Collections.Generic.IEnumerable<Caffeine.Core.ValidationError> LastNameValidationErrors
        {
            get { return LastNameProperty.ValidationErrors; }
        }

        #endregion

        #region DoSomethingE Command

        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        [Caffeine.Core.ModelCommandBackingProperty("OnDoSomethingEExecute", "OnCanDoSomethingEQuery", typeof(ModelForCommandAutoRegisterTestingA))]
        protected readonly Caffeine.Core.ModelCommand<ModelForCommandAutoRegisterTestingA> _DoSomethingECommand = null; //Will be set by reflection.

        /// <summary>
        /// Gets the DoSomethingECommand
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public Caffeine.Core.ModelCommand<ModelForCommandAutoRegisterTestingA> DoSomethingECommand
        {
            get { return _DoSomethingECommand; }
        }

        /// <summary>
        /// Executes the DoSomethingECommand 
        /// </summary>
        /// <param name="parent">Parent view model which owns the DoSomethingECommand</param>
        /// <param name="parameter">Command parameter</param>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public void OnDoSomethingEExecute(Caffeine.Core.ModelBase parent, ModelForCommandAutoRegisterTestingA parameter)
        {
        }

        /// <summary>
        /// Queries whether or not the DoSomethingECommand can execute
        /// </summary>
        /// <param name="parent">Parent view model which owns the DoSomethingECommand</param>
        /// <param name="parameter">Parameter to consider</param>
        /// <returns>True if the DoSomethingECommand can execute with the parameter specified, otherwise false.</returns>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public bool OnCanDoSomethingEQuery(Caffeine.Core.ModelBase parent, ModelForCommandAutoRegisterTestingA parameter)
        {
            return true;
        }

        #endregion

        #region DoSomethingF Command

        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        [Caffeine.Core.ModelCommandBackingProperty("OnDoSomethingFExecute", "OnCanDoSomethingFQuery", typeof(int?))]
        protected readonly Caffeine.Core.ModelCommand<int?> _DoSomethingFCommand = null; //Will be set by reflection.

        /// <summary>
        /// Gets the DoSomethingFCommand
        /// </summary>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public Caffeine.Core.ModelCommand<int?> DoSomethingFCommand
        {
            get { return _DoSomethingFCommand; }
        }

        /// <summary>
        /// Executes the DoSomethingFCommand 
        /// </summary>
        /// <param name="parent">Parent view model which owns the DoSomethingFCommand</param>
        /// <param name="parameter">Command parameter</param>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public void OnDoSomethingFExecute(Caffeine.Core.ModelBase parent, int? parameter)
        {
        }

        /// <summary>
        /// Queries whether or not the DoSomethingFCommand can execute
        /// </summary>
        /// <param name="parent">Parent view model which owns the DoSomethingFCommand</param>
        /// <param name="parameter">Parameter to consider</param>
        /// <returns>True if the DoSomethingFCommand can execute with the parameter specified, otherwise false.</returns>
        [System.CodeDom.Compiler.GeneratedCode("ModelCommand Snippet", "1.0")]
        public bool OnCanDoSomethingFQuery(Caffeine.Core.ModelBase parent, int? parameter)
        {
            return true;
        }

        #endregion
    }
}
